import request from '@/utils/request';

/**
 * 账户总览
 *
 * @returns {Promise<any>}
 */
export async function queryAmtdetailData(payload) {
  // {"resultCode":"ok","errMessage":"","content":[{"releaseDepositAmt":1061.380000,"chargeAmt":11484.1800,"forexAmt":5679881.2363710,"refundFinanceAmt":0.00,"depositAmt":1061.380000,"historyAmt":0.0372}]}
  return request(MC_PATH + '/api/web/report/amtdetail', {
    data: payload
  });
}

/**
 * 全年出口额度
 *
 * @returns {Promise<any>}
 */
export async function queryYearExportvolumeData(payload) {
  // {"resultCode":"ok","errMessage":"","content":[{"year":2018,"12m":0.0000,"11m":0.0000,"10m":0.0000,"currencytype":"USD","total":2666901.0000,"9m":0.0000,"8m":191403.0000,"monthData":[592330.0000,149920.0000,0.0000,936373.5000,197993.4000,598881.1000,0.0000,191403.0000,0.0000,0.0000,0.0000,0.0000],"7m":0.0000,"6m":598881.1000,"5m":197993.4000,"4m":936373.5000,"3m":0.0000,"2m":149920.0000,"1m":592330.0000}]}
  return request(MC_PATH + '/api/web/report/yearExportvolume', {
    data: payload
  });
}

/**
 * 全年报关完成订单数量
 *
 * @returns {Promise<any>}
 */
export async function queryOrderYearNumData(payload) {
  // {"resultCode":"ok","errMessage":"","content":[{"year":2018,"12m":0,"11m":0,"10m":0,"total":14,"9m":0,"8m":1,"monthData":[3,1,0,5,1,3,0,1,0,0,0,0],"7m":0,"6m":3,"5m":1,"4m":5,"3m":0,"2m":1,"1m":3}]}
  return request(MC_PATH + '/api/web/report/orderYearNum', {
    data: payload
  });
}

/**
 * 全年外汇额度
 *
 * @returns {Promise<any>}
 */
export async function queryYearRecamountData(payload) {
  // {"resultCode":"ok","errMessage":"","content":[{"year":2018,"12m":0.00,"11m":0.00,"10m":0.00,"total":2475626.82,"9m":0.00,"8m":0.00,"monthData":[400082.62,306264.85,35901.27,341469.00,395685.43,397341.80,598881.85,0.00,0.00,0.00,0.00,0.00],"claimamountunit":"USD","7m":598881.85,"6m":397341.80,"5m":395685.43,"4m":341469.00,"3m":35901.27,"2m":306264.85,"1m":400082.62}]}
  return request(MC_PATH + '/api/web/report/yearRecamount', {
    data: payload
  });
}
